home *** CD-ROM | disk | FTP | other *** search
/ Aminet 39 / Aminet 39 (2000)(Schatztruhe)[!][Oct 2000].iso / Aminet / gfx / misc / TV-Logo.lha / TV-Logo / Install < prev    next >
Encoding:
Text File  |  2000-08-16  |  3.7 KB  |  213 lines

  1. ;
  2. ; $VER: TV-Logo Installation Script 1.3 (16.08.2000)
  3. ;
  4. ; Author: Damir Arh
  5. ;
  6. ; (c)2000 Digital Amiga Dream, All Rights Reserved
  7. ;
  8. ; This script may not be modified without explicit permission
  9. ; of the author.
  10. ;
  11. ; Installs TV-Logo on a floppy disk or a hard disk.
  12. ;
  13. ;
  14. ; $Id: Install,v 1.3 2000/08/16 15:27:03 damir Rel $
  15. ;
  16. ; $Log: Install,v $
  17. ; Revision 1.3  2000/08/16 15:27:03  damir
  18. ; - user settings don't get overwritten any more
  19. ;
  20. ; Revision 1.2  2000/07/23 10:50:19  damir
  21. ; - the guide gets also installed
  22. ;
  23. ; Revision 1.1  2000/01/30 16:29:51  damir
  24. ; Initial revision
  25. ;
  26. ;
  27. ;
  28. ;-------------------------------------------------
  29.  
  30. ; set the needed constants
  31.  
  32. (set #type-floppy 0)
  33. (set #type-hard 1)
  34.  
  35.  
  36. ;-------------------------------------------------
  37.  
  38. ; set all the strings
  39.  
  40. (set #select-type
  41.     (cat "Where do you want to install " @app-name " to?")
  42. )
  43.  
  44. (set #select-type-help
  45.     (cat "The installation script can install the program "
  46.         "on a floppy disk (to be able to boot from it) or on "
  47.         "your hard disk (to be able to run it from Workbench).\n\n")
  48. )
  49.  
  50. (set #select-floppy "floppy disk")
  51. (set #select-hard "hard disk")
  52.  
  53. (set #select-dest
  54.     (cat "Select destination directory for " @app-name
  55.         " (a new drawer will be created).")
  56. )
  57.  
  58. (set #insert-floppy
  59.     (cat "Please insert an empty floppy disk in DF0:.")
  60. )
  61.  
  62. (set #install-samples
  63.     (cat "Do you want to install the sample settings?\n"
  64.         "(This will overwrite your existing settings.)")
  65. )
  66.  
  67. ;-------------------------------------------------
  68.  
  69. (set #source-dir
  70.     (pathonly @icon)
  71. )
  72.  
  73.  
  74. ;-------------------------------------------------
  75.  
  76. ; floppy or hard disk installation
  77.  
  78. (set #type
  79.     (askchoice
  80.         (prompt #select-type)
  81.         (help #select-type-help @askchoice-help)
  82.         (choices
  83.             #select-floppy
  84.             #select-hard
  85.         )
  86.         (default #select-floppy)
  87.     )
  88. )
  89.  
  90. ; samples installation
  91.  
  92. (set #samples
  93.     (askbool
  94.         (prompt #install-samples)
  95.         (help @askbool-help)
  96.         (default 0)
  97.     )
  98. )
  99.  
  100. ;-------------------------------------------------
  101.  
  102. ; set and prepare destination
  103.  
  104. (if (= #type #type-hard)
  105.  
  106.     (
  107.         (set #destination
  108.             (askdir
  109.                 (prompt #select-dest)
  110.                 (help #select-dest-help @askdir-help)
  111.                 (default @default-dest)
  112.             )
  113.         )
  114.  
  115.         (set @default-dest
  116.             (tackon #destination "TV-Logo")
  117.         )
  118.  
  119.         (makedir @default-dest
  120.             (infos)
  121.         )
  122.     )
  123.  
  124.     (
  125.         (set @default-dest "DF0:")
  126.  
  127.         (message #insert-floppy)
  128.         (run "relabel DF0: TV-Logo")
  129.         (run "install DF0:")
  130.         (delete "DF0:Trashcan"
  131.             (infos)
  132.             (all)
  133.         )
  134.     )
  135.  
  136. )
  137.  
  138. (complete 10)
  139.  
  140.  
  141. ;-------------------------------------------------
  142.  
  143. ; copy the supplied files
  144.  
  145. (copyfiles
  146.     (source (tackon #source-dir "files"))
  147.     (dest @default-dest)
  148.     (all)
  149. )
  150.  
  151. (copyfiles
  152.     (source (tackon #source-dir "TV-Logo_english.guide"))
  153.     (dest @default-dest)
  154.     (infos)
  155. )
  156.  
  157. (if (= 1 #samples)
  158.     (copyfiles
  159.         (source (tackon #source-dir "samples"))
  160.         (dest @default-dest)
  161.         (all)
  162.     )
  163. )
  164.  
  165. (complete 50)
  166.  
  167.  
  168. ;-------------------------------------------------
  169.  
  170. ; delete unneeded files from HD, copy additional files to floppy
  171.  
  172. (if (= #type #type-hard)
  173.  
  174.     (
  175.         (delete (tackon @default-dest "c") (all))
  176.         (delete (tackon @default-dest "fonts") (all))
  177.         (delete (tackon @default-dest "libs") (all))
  178.         (delete (tackon @default-dest "s") (all))
  179.     )
  180.  
  181.     (
  182.         (copyfiles
  183.             (source "C:Assign")
  184.             (dest (tackon @default-dest "c"))
  185.         )
  186.         (copyfiles
  187.             (source "C:SetPatch")
  188.             (dest (tackon @default-dest "c"))
  189.         )
  190.         (delete (tackon @default-dest "c/AddFiles"))
  191.         (copyfiles
  192.             (source "LIBS:asl.library")
  193.             (dest (tackon @default-dest "libs"))
  194.         )
  195.         (copyfiles
  196.             (source "LIBS:diskfont.library")
  197.             (dest (tackon @default-dest "libs"))
  198.         )
  199.         (delete (tackon @default-dest "libs/AddFiles"))
  200.         (delete (tackon @default-dest "TV-Logo.info"))
  201.     )
  202.  
  203. )
  204.  
  205. (complete 100)
  206.  
  207.  
  208. ;-------------------------------------------------
  209.  
  210. ;installation is complete
  211.  
  212. (exit)
  213.